package com.qz.linkedlist;

import java.util.Stack;

/**
 * @Description
 * @Author Flag
 * @Date: 2021/7/5 9:20
 * @Version: 1.0
 **/
public class TestStack {
    public static void main(String[] args) {
        Stack<String> stack= new Stack<>();
        stack.add("jack");
        stack.add("tom");
        stack.add("smith");

        while (stack.size() > 0){
            System.out.println(stack.pop());
        }
    }
}
